﻿using Masa.BuildingBlocks.Ddd.Domain.Entities;
using Masa.BuildingBlocks.Ddd.Domain.Values;

namespace Masa.CqrsProject.Models
{
    /// <summary>
    /// 订单价格值对象(币种+价格)
    /// </summary>
    public class OrderPrice: ValueObject
    {
        /// <summary>
        /// 金额
        /// </summary>
        public decimal? Price { get; set; }
        /// <summary>
        /// 币种
        /// </summary>
        public string? Currency { get; set; }   


        protected override IEnumerable<object> GetEqualityValues()
        {
            yield return Price;
            yield return Currency;
        }


    }
}
